<template>
  <div class>
    <component :is="comInput" :type="type" :status="status"/>
  </div>
</template>

<script type="text/ecmascript-6">

import mobile from "./input/mobile";
import mobileNew from "./input/mobileNew";
import smsCode from "./input/smsCode";
import smsCodef from "./input/forgetSmsCode.vue";
import password from "./input/password";
import password1 from "./input/password1";
import passwordCom from "./input/passwordCom";
import passwordNew from "./input/passwordNew";
import passwordComfirm from "./input/passwordConfirm";
import recommend from "./input/recommend";
import imgCode from "./input/imgCode";
import msgValidate from "./input/msgValidate";
import username from "./input/username";
import storename from "./input/storename";

const inputMap = {
  mobile,
  mobileNew,
  password,
  password1,
  storename,
  passwordNew,
  passwordCom,
    passwordComfirm,
  recommend,
  imgCode,
  msgValidate,
  smsCode,
  smsCodef,
    username
};

export default {
  name: "inputFactory",
  data() {
    return {

    };
  },
  props:{
        name: '',
      type: '',
      status: ''
  },
  computed: {
    comInput() {
      return inputMap[this.name];
    }
  },
  components: {
    inputMap
  }
};
</script>

<style scoped lang="stylus">
</style>
